import RequestManager from "@utils/request";

//创建论坛内表单
export function createForumRequest(userId){
    return RequestManager.instance.request({
        url:'create/Forum/',
        method:'POST',
        data:userId
    })
}
//上传图片
export function uploadImgRequest(file,fourmId){
    return RequestManager.instance.request({
        url : `uploadImg/${fourmId}/`,
        method : 'POST',
        data:file
    })
}
//发布论坛文章
export function uploadForumRequest(data){
    return RequestManager.instance.request({
        url:'UploadFourm/',
        method : 'POST',
        data:data
    })
}
//获取全部文章
export function getForumAllRequest(){
    return RequestManager.instance.request({
        url:'getAll/Fourm/',
        method : 'GET'
    })
}
//获取图片
export function getFourmRequest(id){
    return RequestManager.instance.request({
        url : `getFourm/${id}/`,
        method : 'GET'
    })
}